package ooday03_homework;

public class AnimalTest {

    public static void main(String[] args) {

        Dog[] dogs = new Dog[3];
        dogs[0] = new Dog("Alex", 1, "blue");
        dogs[1] = new Dog("David", 2, "yellow");
        dogs[2] = new Dog("Jack", 3, "green");

        dogs[2].lookHome();
        dogs[1].eat();
        for (int i = 0; i < 3; i++) {
            System.out.println(dogs[i].name);
            dogs[i].swim();
        }

        Chick chick = new Chick("John", 5, "red", "red");
        chick.eat();
        chick.layEgg();
        chick.dirnk();

        Fish[] fish = new Fish[2];
        fish[0] = new Fish("James", 4, "white");
        fish[1] = new Fish("Anna", 2, "black");

        fish[0].swim();
        fish[1].dirnk();
        for (int i = 0; i < 2; i++) {
            fish[i].eat();
        }

    }

}
